﻿<div ng-controller="baofooAccountController">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default"
                           data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    </div>
                    <h4 class="panel-title">宝付账户管理</h4>
                </div>
                <div class="panel-body">
                    <div class="form-inline filter-option">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="pull-right">
                                    <input type="text" ng-model="filter.keyword" class="form-control input-sm"
                                           placeholder="企业名称"/>
                                    <input type="number" ng-model="filter.phone" class="form-control input-sm"
                                           placeholder="管理员手机号"/>
                                    <button class="btn btn-sm btn-info" ng-click="reflash()"><i
                                            class="fa fa-search"></i> 筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <table id="data-table" ng-table="tableParams" template-pagination="template/pagination.html"
                           class="table table-striped table-bordered table-hover table-condensed">
                        <tr ng-repeat="item in $data">
                            <td data-title="'序号'" width="10%" class="text-center">{{ first + $index }}</td>
                            <td data-title="'企业名称'" class="text-left">{{ item.enterprise_name }}</td>
                            <td data-title="'企业座机'" class="text-center">{{ item.enterprise_telephone }}</td>
                            <td data-title="'企业管理员手机'" class="text-left">{{ item.root_phone }}</td>
                            <td data-title="'宝付商户号'" class="text-center">{{ item.member_id }}</td>
                            <td data-title="'宝付商户号描述'" class="text-center">{{ item.description }}</td>
                            <td class="text-center width-100 text-nowrap">
                                <button class="btn btn-info btn-xs" ng-click="check(item)">
                                    <span ng-if="item.member_id != ''"><i class="fa fa-edit"></i> 修改</span>
                                    <span ng-if="item.member_id == ''"><i class="fa fa-plus"></i> 添加</span>
                                </button>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="modal-check">
        <div class="modal-dialog" style="width:1100px">
            <div class="modal-content">
                <ng-form name="checkForm" novalidate>
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
                        </button>
                        <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>资料详情</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-horizontal">
                            <div class="form-group width-full">
                                <label class="control-label col-md-2"> 企业名称：</label>
                                <div class="col-md-4 form-control-static">
                                    {{ model.enterprise_name }}
                                </div>
                            </div>
                            <div class="form-group width-full">
                                <label class="control-label col-md-2">宝付账户：</label>
                                <div class="col-md-10" >
                                    <input type="text"  class="form-control" ng-model="model.member_id" required>
                                </div>
                            </div>
                            <div class="form-group width-full">
                                <label class="control-label col-md-2">宝付账户描述：</label>
                                <div class="col-md-10" >
                                    <textarea cols="20" rows="10" class="form-control" ng-model="model.description"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-sm btn-success" ng-click="save()"
                                ng-disabled="checkForm.$invalid">
                            <i class="fa fa-save"></i> 保存
                        </button>
                    </div>
                </ng-form>
            </div>
        </div>
    </div>

</div>

